IF EXIST "%ProgramFiles(x86)%" (
	ECHO This is a 64bit system.
	GOTO :X86
)

set programFolder=%ProgramFiles%

GOTO CREATEDLL

:X86
set programFolder=%ProgramFiles(x86)%
GOTO CREATEDLL

:CREATEDLL

set tlbimpPath="%programFolder%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\tlbimp"

echo "%programFolder%"

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXBape.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXBape.ocx /out:"..\..\Typelib\LittleATM.Interop.KXBape.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXBarcodeScanner.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXBarcodeScanner.ocx /out:"..\..\Typelib\LittleATM.Interop.KXBarcodeScanner.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXCamera.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXCamera.ocx /out:"..\..\Typelib\LittleATM.Interop.KXCamera.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXCardReader.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXCardReader.ocx /out:"..\..\Typelib\LittleATM.Interop.KXCardReader.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXCashAcceptor.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXCashAcceptor.ocx /out:"..\..\Typelib\LittleATM.Interop.KXCashAcceptor.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXCashDispenser.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXCashDispenser.ocx /out:"..\..\Typelib\LittleATM.Interop.KXCashDispenser.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXDoors.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXDoors.ocx /out:"..\..\Typelib\LittleATM.Interop.KXDoors.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXGuideLights.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXGuideLights.ocx /out:"..\..\Typelib\LittleATM.Interop.KXGuideLights.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXIndicators.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXIndicators.ocx /out:"..\..\Typelib\LittleATM.Interop.KXIndicators.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXOperatorPanel.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXOperatorPanel.ocx /out:"..\..\Typelib\LittleATM.Interop.KXOperatorPanel.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXReceiptPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXReceiptPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXReceiptPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXSensors.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXSensors.ocx /out:"..\..\Typelib\LittleATM.Interop.KXSensors.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXVendorMode.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXVendorMode.ocx /out:"..\..\Typelib\LittleATM.Interop.KXVendorMode.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)

IF NOT EXIST "..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll" (
%tlbimpPath% ..\..\ATMLibs\3rdParty\KAL\Kalignite310\KXJournalPrinter.ocx /out:"..\..\Typelib\LittleATM.Interop.KXJournalPrinter.dll"
)